﻿using Microsoft.Practices.ServiceLocation;
using GalaSoft.MvvmLight;
using GalaSoft.MvvmLight.Command;
using GalaSoft.MvvmLight.Messaging;

using DaphneProfiBase;
using GameEngine;
using DaphneControls.ViewModel;

namespace DaphneControls.ViewModel
{
    /// <summary>
    /// PDN Game Control View Model
    /// </summary>
    public class GameControlVM : ViewModelBase
    {
        /// <summary>
        /// The current game GameManager object
        /// </summary>
        private GameManager _gameManager;

        /// <summary>
        /// Constructor - initialization
        /// </summary>
        public GameControlVM()
        {
            // register message for the setting of the current game manager
            Messenger.Default.Register<NotificationMessage<GameManager>>(this, (nm) =>
            {
                if (nm.Notification == Notify.SetGameManager)
                {
                    _gameManager = nm.Content;
                }
            });
        }           
    }
}